<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        .layui-form-label {
            width: 200px;
        }
    </style>
</head>
<body>
<div class="layui-fluid vue-box">
    <div class="layui-card" style="padding: 100px">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input type="text" v-model:value="th.name" name="name" required lay-verify="required"
                           placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">分类</label>
                <div class="layui-input-block">
                    <input type="text" v-model:value="th.label" name="label" required lay-verify="required"
                           placeholder="请输入分类" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">简介</label>
                <div class="layui-input-block">
                    <input type="text" v-model:value="th.intro" name="intro" required lay-verify="required"
                           placeholder="请输入简介" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">主图<i class="icon-re">*</i></label>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="upload">
                            上传图片
                        </button>
                    </div>
                    <div class="layui-input-inline" v-for="(item,i) in th.image">
                        <img v-bind:src="item" style="width: 100px;margin: 0 auto">
                        <br>
                        <br>
                        <a @click="delNote(i)" type="button" class="layui-btn layui-btn-sm layui-btn-danger">
                            删除
                        </a>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否首页</label>
                <div class="layui-input-block">
                    <input type="checkbox" v-if="th.isIndex == true" checked lay-text="ON|OFF"  name="isIndex" lay-skin="switch">
                    <input type="checkbox" v-if="th.isIndex == false"  lay-text="ON|OFF"  name="isIndex" lay-skin="switch">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图文详情<i class="icon-re">*</i></label>
                <div class="layui-input-block">
                    <div id="xq"></div>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 10px">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" th:src="@{/js/require.js}"></script>
<script type="text/javascript" th:src="@{/js/requireConfig.js}"></script>
<script type="text/javascript" th:src="@{/app/admin/essay/set.js}"></script>
</body>
</html>